<template>
	<!-- 图标+文字 -->
	<view class="icon-text">
		<u-icon v-if="iconPosition==0&&showIcon" :name="iconPath" :size="iconSize"></u-icon>
		<view class="text">{{ iconText }}</view>
		<u-icon v-if="iconPosition==1&&showIcon" :name="iconPath" :size="iconSize"></u-icon>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				
			}
		},
		props:{
			iconPosition:{
				type:Number,
				default:0
			},
			iconPath:{
				type:String,
				default:''
			},
			iconText:{
				type:String,
				default:''
			},
			iconSize:{
				type:Number,
				default:30
			},
			showIcon:{
				type:Boolean,
				default:true
			}
		}
	}
</script>

<style scoped lang="scss"> 
	.icon-text{
		display: flex;
		flex-direction: row;
		align-items: center;
		.text{
			margin-left: 16rpx;
		}
	}
</style>
